package com.panopset.flywheel;

import static com.panopset.Util.*;

/**
 * <h5>q - Quit</h5>
 *
 * <pre>
 * ${&#064q}
 * </pre>
 * <ul>
 * <li>If the q command follows a p command, the String buffer is defined as the
 * variable name that was provided in the p command.</li>
 * <li>If the q command follows an l command, the String buffer is read for the
 * each item in the list.</li>
 * </ul>
 *
 * @author Karl Dinwiddie
 *
 */
public class CommandQuit extends TemplateDirectiveCommand {
    protected MatchableCommand matchableCommand;

    public static String getShortHTMLText() {
        return "${&#064;q}";
    }

    public CommandQuit(String source, Template template) {
        super(source, EMPTY_STRING, template);
    }


    protected void match(MatchableCommand matchableCommand) {
        matchableCommand.commandQuit = this;
        this.matchableCommand = matchableCommand;
    }
}
